<?php
/**
 *Session调用类
 *@author sulwan@126.com
 *@date 2009-11-20
 */
class Session
{
	static private $_instance = null;

	static public function Init($debug=false)
	{
		if (!session_id()) session_start();
	}

	static public function Set($name, $v){
		$_SESSION[$name] = $v;
	}

	static public function Get($name, $once=false){
		$v = null;
		if ( isset($_SESSION[$name]) )
		{
			$v = $_SESSION[$name];
			if ( $once ) unset( $_SESSION[$name] );
		}
		return $v;
	}
}